package com.cfuture08.eweb4j.config;

import java.util.ArrayList;
import java.util.List;

import com.cfuture08.eweb4j.config.bean.ConfigBean;
import com.cfuture08.eweb4j.config.bean.ConfigIOC;
import com.cfuture08.eweb4j.config.bean.ConfigMVC;
import com.cfuture08.eweb4j.config.bean.ConfigORM;
import com.cfuture08.eweb4j.config.bean.IOCXmlFiles;
import com.cfuture08.eweb4j.config.bean.MVCXmlFiles;
import com.cfuture08.eweb4j.config.bean.ORMXmlFiles;

/**
 * EWeb4J存取配置信息的bean的创建
 * 
 * @author cfuture.aw
 * @since v1.a.0
 * 
 */
public class ConfigBeanCreator {
	public static ConfigBean getConfigBean() {
		ConfigBean configBean = new ConfigBean();
		ConfigIOC ioc = new ConfigIOC();
		List<IOCXmlFiles> iocXmlFiles = new ArrayList<IOCXmlFiles>();
		iocXmlFiles.add(new IOCXmlFiles());
		ioc.setXmlFiles(iocXmlFiles);
		configBean.setIoc(ioc);
		
		ConfigORM orm = new ConfigORM();
		List<ORMXmlFiles> ormXmlFiles = new ArrayList<ORMXmlFiles>();
		ormXmlFiles.add(new ORMXmlFiles());
		orm.setXmlFiles(ormXmlFiles);
		configBean.setOrm(orm);
		
		ConfigMVC mvc = new ConfigMVC();
		List<MVCXmlFiles> mvcXmlFiles = new ArrayList<MVCXmlFiles>();
		mvcXmlFiles.add(new MVCXmlFiles());
		mvc.setXmlFiles(mvcXmlFiles);
		configBean.setMvc(mvc);
		
		return configBean;
	}
}
